<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>工程进度款上报</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="../../../resources/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../resources/css/style.css" media="all">
    <style>
        .titles{font-size: 20px; text-align: center;}
        .tabL,.tabR{display: inline-block;}
        .tabL{width: 30%;}
        .tabR{width: 70%; float: right;}
        .layui-table tbody tr td{width: 50%;}
        .layui-inline,.layui-input-inline{width: 100%;}
        thead tr th{width: 20%!important;}
        tbody tr td{width: 20%!important;}
        .details ul li{width: 50%;float: left;}
        .dataR{float: none;}
    </style>
</head>
<body>

<button class="layui-btn" type="button" onclick="history.back(-1);"><i class="layui-icon"></i></button>
<div class="details">
    <!--<ul>-->
        <!--<li><span class='detaL'>项目名称：</span><span class="dataR"> </span></li>-->
        <!--<li><span class='detaL'>施工单位：</span><span class="dataR"> </span></li>-->
        <!--<li><span class='detaL'>施工单位负责人：</span><span class="dataR"></span></li>-->
        <!--<li><span class='detaL'>施工单位联系方式：</span><span class="dataR"> </span></li>-->
        <!--<li><span class='detaL'>结算经手人：</span><span class="dataR"></span></li>-->
        <!--<li><span class='detaL'>决算日期：</span><span class="dataR"></span></li>-->

    <!--</ul>-->
</div>
<div class="main">
    <table class="layui-table">
        <thead>
            <tr>
                <th>名称</th>
                <th>数量</th>
                <th>单价</th>
                <th>计量单位</th>
                <th>小计</th>
            </tr>
        </thead>
        <tbody>
            <!--<tr>-->
                <!--<td></td>-->
                <!--<td></td>-->
                <!--<td></td>-->
                <!--<td></td>-->
                <!--<td></td>-->
            <!--</tr>-->
        </tbody>
    </table>



</div>





<script src="../../../resources/layui/layui.js" charset="utf-8"></script>
<script src="../../../resources/js/style.js"></script>
<script src="../../../resources/js/api.js"></script>
<script>

    layui.use(['form', 'layedit', 'laydate','table','element','upload'], function(){
        var form = layui.form
            ,layer = layui.layer
            ,layedit = layui.layedit
            ,laydate = layui.laydate
            ,table=layui.table
            ,element=layui.element
            ,upload = layui.upload;
        var canshu=new Object();

        var kaicao=0;
        var renshou=0;
        var d=JSON.parse(sessionStorage.objs);
        d=d.data;
        console.log(d)
        $('.details').append(' <ul>\n' +
            '        <li><span class=\'detaL\'>项目名称：</span><span class="dataR">'+d.proName+'</span></li>\n' +
            '        <li><span class=\'detaL\'>施工单位：</span><span class="dataR">'+d.compName1+'</span></li>\n' +
            '        <li><span class=\'detaL\'>施工单位负责人：</span><span class="dataR">'+d.compPerson1+'</span></li>\n' +
            '        <li><span class=\'detaL\'>施工单位联系方式：</span><span class="dataR">'+d.compTel1+'</span></li>\n' +
            '        <li><span class=\'detaL\'>结算经手人：</span><span class="dataR">'+d.createUser+'</span></li>\n' +
            '        <li><span class=\'detaL\'>决算日期：</span><span class="dataR">'+d.updateTime+'</span></li>\n' +
            '\n' +
            '    </ul>')



        ajaxs('/api/process/buildProcessPriceManaListOrDetails.do','post',{'type':'b','remark':sessionStorage.remark},function (data) {
            //console.log(data);
            var datas=data.data;
            var jia=0;
            var dzj=0;
            for(var i=0;i<datas.length;i++){
                if(datas[i].bt_Name.indexOf('直')==1||datas[i].bt_Name.indexOf('梅')==1){
                    jia=datas[i].oprice;
                    dzj+=Number(((datas[i].bt_Value)*kaicao).toFixed(4));
                }else{
                    jia=datas[i].hprice;
                    dzj+=Number(((datas[i].bt_Value)*renshou).toFixed(4));
                }

                $('.layui-table tbody').append(' <tr>\n' +
                    '                <td>'+datas[i].bt_Name+'</td>\n' +
                    '                <td>'+datas[i].bt_Value+'</td>\n' +
                    '                <td>'+jia+'</td>\n' +
                    '                <td>'+datas[i].bt_bit+'</td>\n' +
                    '                <td>'+datas[i].bt_Value*jia+'万元'+'</td>\n' +
                    '            </tr>')


            }

        })








    })

</script>

</body>
</html>